home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / help / 5_programming / stub < prev    next >
Encoding:
Text File  |  2002-10-28  |  1.2 KB  |  32 lines

  1. Synopsis:
  2.    stub alias|assign <alias/var>[,<alias/var>] <filename> [<filename> ...]
  3.  
  4. Description:
  5.    The STUB command allows for a sort of dynamic script loading.  Any
  6.    alias or variable name may be associated with a file; that alias or
  7.    variable effectively becomes a stub for that file, a placeholder.
  8.    When that alias/variable is accessed, the file is loaded.
  9.  
  10.    Stubs are always cleared when the alias or variable associated with
  11.    them is accessed.  That is, calling the variable again will not
  12.    reload the same file.  Stubs are also cleared any time a stubbed
  13.    file is loaded.  The file that is loaded does not necessarily need
  14.    to contain to redefine the alias or variable associated with it.
  15.    Finally, Stubs may load more than one file at a time.
  16.  
  17. Examples:
  18.    To load the file foobar.irc when the /foo command is issued:
  19.       stub alias foo foobar.irc
  20.       
  21.    To load footoo.irc when $foo and $bar are accessed:
  22.       stub assign foo,bar footoo.irc
  23.  
  24. See Also:
  25.    alias(5); assign(5); load(5)
  26.  
  27. Other Notes:
  28.    STUB is not a memory management tool.  Its purpose is to minimize the
  29.    client's overhead at it initially starts up.  Files that are loaded
  30.    with STUB are not automatically unloaded later.
  31.  
  32.